//
//  cellViewadd.m
//  YaoHeAPP
//
//  Created by xyh on 15/12/14.
//  Copyright © 2015年 mac. All rights reserved.
//

#import "cellViewadd.h"
#import "Masonry.h"

@interface cellViewadd ()
{
    
    
    
}


@end

@implementation cellViewadd
- (id)init
{
    
    self=[super init];
    
    if (self) {
        
        //建立顶部长条
        _topView=[[UIView alloc]init];
        [self addSubview:_topView];
        [_topView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.offset(0);
            make.left.offset(0);
            make.right.offset(0);
            make.height.offset(26);
        }];
        _topView.backgroundColor=[UIColor colorWithRed:255/255.0 green:255/255.0 blue:25/255.0  alpha:1];
        
        
        //顶部小图片
        _topimg=[[UIImageView alloc]initWithFrame:CGRectMake(15, 5, 15, 15)];
        [_topView addSubview:_topimg];
        //顶部显示label
        _toplabel=[[UILabel alloc]initWithFrame:CGRectMake(35, 5, 150, 15)];
        _toplabel.textColor=[UIColor colorWithRed:102/255.0 green:102/255.0 blue:102/255.0  alpha:1];
        _toplabel.font = [UIFont systemFontOfSize:13];
        [_topView addSubview:_toplabel];
        
        //顶部时间图片 时间
        _toptimeimg=[[UIImageView alloc]initWithFrame:CGRectMake(self.frame.size.width-15-100-5-15, 5, 15, 15)];
        [_topView addSubview:_toptimeimg];
        //顶部时间
        _toptimelabel=[[UILabel alloc]initWithFrame:CGRectMake(205, 5, 100, 15)];
        _toptimelabel.textColor=[UIColor colorWithRed:139/255.0 green:139/255.0 blue:139/255.0  alpha:1];
        _toptimelabel.font = [UIFont systemFontOfSize:12];
        [_topView addSubview:_toptimelabel];
        
        
        
        
        
        //建立中间试图
        
        _towView=[[UIView alloc]initWithFrame:CGRectMake(0, 26, self.frame.size.width, 63)];
        _towView.backgroundColor=[UIColor colorWithRed:249/255.0 green:249/255.0 blue:249/255.0  alpha:1];
        [self addSubview:_towView];
        
        
        //cell图片
        _towImage=[[UIImageView alloc]initWithFrame:CGRectMake(15, 5, 55, 55)];
        [_towView addSubview:_towImage];
        
        //cell中大名称label
        _towNamelabel=[[UILabel alloc]initWithFrame:CGRectMake(75, 13, 165, 15)];
        _towNamelabel.textColor=[UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0  alpha:1];
        _towNamelabel.font = [UIFont systemFontOfSize:15];//采用系统默认文字设置大小
        //    _towNamelabel.font = [UIFont fontWithName:@"Arial" size:30];//设置文字类型与大小
        _towNamelabel.textAlignment = NSTextAlignmentLeft;
        [_towView addSubview:_towNamelabel];
        
        //地址图片
        _addimage=[[UIImageView alloc]init];
        [_towView addSubview:_addimage];
        [_addimage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(_towNamelabel.mas_bottom).offset(5);
            make.left.equalTo(_towNamelabel.mas_left).offset(0);
            make.width.offset(18);
            make.height.offset(20);
        }];
        
        
        //地址名称
        _addname=[[UILabel alloc]init];
        [_towView addSubview:_addname];
        [_addname mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_addimage.mas_right).offset(5);
            make.bottom.equalTo(_addimage.mas_bottom).offset(0);
            make.height.offset(15);
            make.width.offset(165);
        }];
        _addname.textColor=[UIColor colorWithRed:139/255.0 green:139/255.0 blue:139/255.0  alpha:1];
        
        
        
        //箭头小图标
        _Noandnumimage =[[UIImageView alloc]initWithFrame:CGRectMake(self.frame.size.width-25, 28, 10, 15)];
        [_towView addSubview:_Noandnumimage];
        _Noandnum=[[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.width-15-15-5-50, 28, 50, 15)];
        [_towView addSubview:_Noandnum];
        
        
//        //建立最底部可变试图（通过判断是否显示）
//        _bottmView=[[UIView alloc]initWithFrame:CGRectMake(0, 89, self.frame.size.width, 40)];
//        _bottmView.backgroundColor=[UIColor whiteColor];
//        
//        _zhijianxiang=[[UILabel alloc]init];
//        _zhijianxiang.frame=CGRectMake(15, 5, 30, 15);
//        _zhijianxiang.textColor=[UIColor colorWithRed:52/255.0 green:52/255.0 blue:52/255.0  alpha:1];
//        _zhijianxiang.font = [UIFont systemFontOfSize:14];//采用系统默认文字设置大小
//        _zhijianxiang.numberOfLines=0;
//        [_bottmView addSubview:_zhijianxiang];
//        
//        
//        _zhijiantext=[[UILabel alloc]init];
//        _zhijiantext.frame=CGRectMake(45, 5, self.frame.size.width-60, 30);
//        _zhijiantext.textColor=[UIColor colorWithRed:52/255.0 green:52/255.0 blue:52/255.0  alpha:1];
//        _zhijiantext.font = [UIFont systemFontOfSize:12];//采用系统默认文字设置大小
//        _zhijiantext.numberOfLines=0;
//        [_bottmView addSubview:_zhijiantext];
//        
//        
//        [self addSubview:_bottmView];
    }
    
    

    return self;
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
